package strategy.strategyTwo;

public class XMLUtil {

    /*public static Object getBean() throws Exception {
        SAXReader reader = new SAXReader();
        String path = XMLUtil.class.getClassLoader().
                getResource("com/somnus/designPatterns/strategy/config.xml").getPath();
        Document document = reader.read(new File(path));
        String cName = document.selectSingleNode("/config/className").getText();
        //通过类名生成实例对象并将其返回
        Class<?> c = Class.forName(cName);
        Object obj = c.newInstance();
        return obj;
    }*/

}
